package enumzb;

/**
 * @author wzby
 * @Date: 2022/8/11 14:25
 */
public class MessageDemo {
    public static void main(String[] args) {
        var me = MessageEnum.START;
        me = MessageEnum.froTypeCode(500);
        switch (me) {
            case START -> {
                System.out.println("信息:" + me.ordinal() + me.getMessage() + me.getCode());
            }
            case OPEN -> {
                System.out.println("信息:" + me.ordinal() + me.getMessage() + me.getCode());
            }
            case SAVE -> {
                System.out.println("信息:" + me.ordinal() + me.getMessage() + me.getCode());
            }
            case ERROR -> {
                System.out.println("信息:" + me.ordinal() + me.getMessage() + me.getCode());
            }
            case DELETE -> {
                System.out.println("信息:" + me.ordinal() + me.getMessage() + me.getCode());
            }
            default -> {
                System.out.println("失效");
            }
        }
    }
}
